package com.service.Authorization.service;

import com.service.Authorization.dto.UserDto;
import com.service.Authorization.entity.QyCorpInfo;
import com.service.Authorization.entity.QyProgrammeApiBind;
import com.service.Authorization.vo.*;
import com.service.config.utils.Result;

import java.util.List;

/**
 * (QyCorpInfo)表服务接口
 *
 * @author makejava
 * @since 2021-09-09 15:42:00
 */
public interface QyCorpInfoService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    QyCorpInfo queryById(String id);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit  查询条数
     * @return 对象列表
     */
    List<QyCorpInfo> queryAllByLimit(int offset, int limit);

    /**
     * 新增数据
     *
     * @param qyCorpInfo 实例对象
     * @return 实例对象
     */
    QyCorpInfo insert(QyCorpInfo qyCorpInfo);

    /**
     * 修改数据
     *
     * @param qyCorpInfo 实例对象
     * @return 实例对象
     */
    QyCorpInfo update(QyCorpInfo qyCorpInfo);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(String id);

    Result queryByUserId(String userId, Integer type);

    Result addQyCorpInfo(AddQyCorpInfoDto addQyCorpInfoDto, UserDto userDto);

    Result updateQyCorpInfo(UpdateQyCorpInfoDto updateQyCorpInfoDto);

    Result freshQyCorpInfo(String qyCorpInfoId);

    Result QyCorpInfoBindApi(List<QyProgrammeApiBind> qyProgrammeApiBindList,String userId);

    Result cancelQyCorpInfoBindApi(QyCorpInfoVo qyCorpInfoVo);

    Result getQyCorpInfoDetails(String userId, String qyCorpInfoId);

    Result checkQyWeiUser(String bAuthToken, SecretAndCode secretAndCode) throws Exception;

    Result getHtml(AuthorizationVo authorizationVo) throws Exception;

    Result checkQyWeiUser(String apmac, String umac, String ssid) throws Exception;

    Result deleteQyCorpInfo(String userId, String qyCorpInfoId);

    Result FindQyCorpInfoBindApi(String programmeId, String userId);

    Result getSecret(AuthorizationVo authorizationVo) throws Exception;

    Result getWeiChatHtml(String number, String programmeId) throws Exception;

    Result checkQyWeChatUser(String bAuthToken, AuthorizationVo authorizationVo) throws Exception;

    Result getUrlScheme(AuthorizationVo authorizationVo) throws Exception;
}
